{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**创建一个形为5×3的二维数组，以包含5到10之间的随机数。**\n",
    "\n",
    "【知识点：随机抽样】\n",
    "- 如何创建随机二维数组？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-09-06T03:02:49.540699Z",
     "start_time": "2020-09-06T03:02:49.430660Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[6 7 6]\n",
      " [5 6 5]\n",
      " [8 8 8]\n",
      " [9 8 7]\n",
      " [8 7 6]]\n",
      "[[7.17742843 9.67201535 6.03259923]\n",
      " [9.67097091 9.08662124 5.13643319]\n",
      " [7.51864734 7.7036486  7.8195777 ]\n",
      " [5.50024593 9.66330664 5.18939603]\n",
      " [8.34728051 5.3017636  6.30038456]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "x = np.random.randint(5, 10, [5, 3])\n",
    "print(x)\n",
    "# [[5 8 8]\n",
    "#  [5 6 8]\n",
    "#  [8 8 7]\n",
    "#  [6 7 9]\n",
    "#  [6 5 8]]\n",
    "\n",
    "x = np.random.uniform(5, 10, [5, 3])\n",
    "print(x)\n",
    "# [[6.73675226 8.50271284 9.66526032]\n",
    "#  [9.42365472 7.56513263 7.86171898]\n",
    "#  [9.31718935 5.71579324 9.92067933]\n",
    "#  [8.90907128 8.05704153 6.0189007 ]\n",
    "#  [8.70753644 7.75056151 5.71714203]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python35",
   "language": "python",
   "name": "python35"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
